import { defineStore } from 'pinia';

export const useStore = defineStore({
	id: 'globalState',
	state: () => ({
		count: 2
	}),
	getters: {
		getCount(state) {
			return state.count ** 2
		},

		getCountTwo: state => state.count * 5,

		countGetCountGetters() {
			return this.getCount
		}
	},
	actions: {
		countPlusOne() {
			this.count++;
		},
		countPlus(num: number) {
			this.count += num;
		}
	}
})
